<script type="text/javascript" src="/js/distance.js"></script>
<h2> Places list</h2>
<a href="/place/add"> Add new </a>
<?php if (count($this->pages)): ?>
      <?php foreach ($this->pages as $item): ?>
         <fieldset>
            <img src="/" alt="<?php echo $item['title']; ?>">
            <?php
            $location = unserialize($item['location']);
            echo $item['title'] . ' ';
            echo implode(', ', $location);
            ?>
            <a href="/place/edit/id/<?php echo $item['id']?>"> Edit </a>
            <a href="/place/delete/id/<?php echo $item['id']?>"> Delete </a>
         </fieldset>
      <?php endforeach; ?>
<?php endif; ?>
<?php
echo $this->paginationControl($this->pages, 'Sliding', '/partials/pagination.phtml');
?>